home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl150l.zip / COMPLIB / 68K / 68MULU.SRC < prev    next >
Text File  |  1996-12-14  |  483b  |  27 lines

  1.     section code
  2.     XDEF    __mulu,llumul
  3. __mulu:
  4.     move    (8,A7),D0
  5.     move    (4,A7),D1
  6. llumul:
  7.     movem.l    d5-d7,-(a7)
  8.     clr.l    d2
  9.     move.w    d0,d2
  10.     lsr.l    #8,d0
  11.     lsr.l    #8,d0
  12.     move.w    d0,d5    ;D5:D2
  13.     clr.l    d6
  14.     move.w    d1,d6
  15.     lsr.l    #8,d1
  16.     lsr.l    #8,d1
  17.     move.w    d1,d7   ;D7:D6
  18.     move.w    d2,d0
  19.     mulu.w    d6,d0   ;D0= D2*D6
  20.     mulu.w    d7,d2   ;D2= D2*D7
  21.     mulu.w    d6,d5   ;D5= D6*D5
  22.     add.w    d5,d2   ;D6*D5+D2*D7
  23.     lsl.l    #8,d2    ; << 16
  24.     lsl.l    #8,d2    ;
  25.     add.l    D2,d0   ;+D2*D6
  26.     movem.l    (a7)+,d5-d7
  27.     rts